package com.zb.api.common.econts;


public enum MerchantTypeEnum {
    WHOLE_HOUSE_CUSTOMIZATION(1, "全屋定制"),
    BUILDING_MATERIALS_MERCHANTS(2, "建材商家"),
    BUILDING_DESIGN(3, "房屋设计"),
    FURNITURE_HOUSEHOLD_APPLIANCES(4, "家具家电"),
    OTHER(5, "其他")
  ;

    private String desc;
    private Integer value;

    MerchantTypeEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public Integer getValue() {
        return value;
    }


    public static MerchantTypeEnum valueOf(Integer value) {
        for (MerchantTypeEnum statusEnum : values()) {
            if (statusEnum.getValue().equals(value)) {
                return statusEnum;
            }
        }
        throw new RuntimeException("没有找到对应的枚举");
    }

    public static String value (Integer value) {
        for (MerchantTypeEnum item : MerchantTypeEnum.values()) {
            if (item.getValue().equals(value)) {
                return item.getDesc();
            }
        }
        return null;
    }
}
